<template>
  <div>
    <ul>
      <li v-for="u in usersList" :key="u.node_id">
        <img :src="u.avatar_url" :title="u.login">
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'my-list',
  data() {
    return {
      usersList: []
    }
  },
  mounted() {
    this.$bus.$on('usersList', this.getUsers)
  },
  methods: {
    getUsers(data) {
      this.usersList = data
    }
  }
}
</script>